Home / DeveloperSection / Interviews / Can an Interface have an inner class?
You haven’t finished your post yet. Are you sure you want to leave and discard your draft?
Can you answer this question?
Anonymous User
Yes.
public interface abc { static int i=0; void dd(); class a1 { a1() { int j; System.out.println("inside"); }; public static void main(String a1[]) { System.out.println("in interfia"); } } }
You have need login or register for voting of answers or question.
Anonymous User
21-May-2011Yes.
public interface abc
{
static int i=0; void dd();
class a1
{
a1()
{
int j;
System.out.println("inside");
};
public static void main(String a1[])
{
System.out.println("in interfia");
}
}
}